/**
 * 
 * 收支统计请求
 * 
 */
import Axios from 'axios'

import { requestHeader } from './requestHeader' 


// 获取收费信息

export function getInfo(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/getInfo',
        method: 'get'
      })

}

// 获取退费信息
export function getTf(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/returnPremium',
        method: 'get'
      })

}

// 查询现金支付总金额 Cash
export function getCash(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/getCash',
        method: 'get'
      })

}


// 查询微信支付总金额 WeChat
export function getWeChat(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/getWeChat',
        method: 'get'
      })

}

// 查询支付宝支付总金额 Alipay
export function getAlipay(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/getAlipay',
        method: 'get'
      })

}

// 查询总金额 lumpSumExpenses
export function getlumpSumExpenses(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/lumpSumExpenses',
        method: 'get'
      })

}




// 查询退款总金额 totalRefund
export function gettotalRefund(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/totalRefund',
        method: 'get'
      })

}


//条件查询
export function queryInfo(pageNum, chargetype,chargestatus,startDate,endDate){

  var f = new FormData()
  f.append('pageNum', pageNum)

  f.append('chargetype', chargetype)
  f.append('chargestatus', chargestatus)
  f.append('startDate', startDate)
  f.append('endDate', endDate)


  return Axios.post(requestHeader() + '/IncomeAndExpenses/queryInfo', f)

}


//分页查询

export function paging(pageNum){

  return Axios(
    {
        url: requestHeader() + '/IncomeAndExpenses/paging',
        method:'post',
        params:{"pageNum":pageNum}
    }
    
    
    )

}


//年月表表统计信息 
export function monthlyReport(num){

  return Axios({
    url: requestHeader() + '/monthlyReport/getMonthlyReport',
    method: 'get',
    params:{"num":num}
  })  
}


//获取一年的信息
export function annualStatistics(year){

  return Axios({
    url: requestHeader() + '/monthlyReport/annualStatistics',
    method: 'get',
    params:{"year":year}
  })  
}





